package com.youlu.campus.service.wechat;

import com.youlu.campus.entity.WechatAccessTokenPO;
import com.youlu.campus.entity.WechatH5UserPO;
import com.youlu.campus.entity.domain.WechatAccessToken;

import java.util.List;

public interface WechatH5Service {

    boolean create(WechatAccessTokenPO req);

    WechatAccessTokenPO getByAppId(String appId);

    /**
     * 定期刷新AccessToken
     *
     * @param appId
     * @return
     */
    boolean refresh(String appId);


    WechatAccessToken getAccessToken(String appId, String appSecret);

    String getJsapiTicket(String appId);

    /**
     * 创建永久二维码
     *
     * @param appId
     * @param sceneStr
     * @return
     */
    String createForeverTicket(String appId, String sceneStr);


    WechatH5UserPO findByUnionId(String unionId);

    List<WechatH5UserPO> selectByUnionId(String unionId);

    WechatH5UserPO findByOpenId(String openId);

    List<WechatH5UserPO> findByUserId(String userId);

    boolean deleteByUserId(String userId);

    boolean deleteMiniUser(String userId);
}
